<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition>
            <h:form>
                <div class="phai">
                    <p> DANH SÁCH YÊU CẦU ĐÃ GỬI</p>
                    <ul id="service_form" class="p_form">
                        <li>
                            <span>Xem theo trạng thái :</span>
                            <h:selectOneMenu id="somType" value="#{adminComplaintRequest.viewByStatus}">  
                                <f:selectItems value="#{adminComplaintRequest.listStatusComp()}" />  
                            </h:selectOneMenu> 
                            <h:commandButton value="Search" action="#{adminComplaintRequest.searchComplaintByStatus()}"/>
                        </li>
                        <li>
                            <span>Xem theo dịch vụ :</span>
                            <h:selectOneMenu id="somType1" value="#{adminComplaintRequest.viewByType}">  
                                <f:selectItems value="#{adminComplaintRequest.listTypeComp()}" />  
                            </h:selectOneMenu> 
                            <h:commandButton value="Search" action="#{adminComplaintRequest.searchComplaintByType()}"/>
                        </li>
                        <li>
                            <span>Xem theo ngày :</span>
                            <h:selectOneMenu id="somType2" value="#{adminComplaintRequest.viewByDeadline}">  
                                <f:selectItems value="#{adminComplaintRequest.listDeadlineComp()}" />  
                            </h:selectOneMenu> 
                            <h:commandButton value="Search" action="#{adminComplaintRequest.searchComplaintByDeadline()}"/>
                        </li>
                        <li>
                            <span>Xem theo bộ phận :</span>
                            <h:selectOneMenu id="somType3" value="#{adminComplaintRequest.viewByDepartment}">  
                                <f:selectItems value="#{adminComplaintRequest.listTypeDepartment()}" />  
                            </h:selectOneMenu> 
                            <h:commandButton value="Search" action="#{adminComplaintRequest.searchComplaintByDepartment()}"/>
                        </li>
                    </ul>
                    <div style="width: 100%; margin-top: 5px; border: 1px solid #CCCCCC;" class="nl">
                        <div style="width: 200px" class="dongtieude_table">
                            Vấn để hỏi
                        </div>
                        <div style="width: 120px" class="dongtieude_table">
                            Dịch vụ
                        </div>
                        <div style="width: 70px" class="dongtieude_table">
                            Trạng thái
                        </div>
                        <div style="width: 70px" class="dongtieude_table">
                            Bộ phận
                        </div>
                        <div style="width: 170px" class="dongtieude_table">
                            Hạn trả lời
                        </div>
                        <div style="width: 50px;" class="dongtieude_table">
                            Hủy
                        </div>
<!--                        <h:inputText value="#{adminComplaintRequest.eid}"/>-->
                        <ui:repeat value="#{adminComplaintRequest.listComp}" var="b">
                            <div class="nl" id="requestList">
                                <div id="reqitem_1358121" style="border-bottom: dotted 1px #cccccc;" class="nl">
                                    <div style="width: 200px;" class="request_item">
                                        <h:commandLink style="text-decoration: none" action="#{adminComplaintRequest.listComplaintDetailByCID()}" value="#{b.title}">
                                            <f:param name="cID" value="#{b.c_ID}"></f:param>
                                        </h:commandLink>
                                    </div>
                                    <div style="width: 120px" class="request_item">
                                        #{b.typeString}
                                    </div>
                                    <div style="width: 70px" class="request_item">
                                        Re: #{b.status}
                                    </div>
                                    <div style="width: 70px" class="request_item">
                                        #{b.dname}
                                    </div>
                                    <div style="width: 170px" class="request_item">
                                        #{b.deadline}
                                    </div>
                                    <div style="width: 50px; text-align: center;" class="request_item">
                                        <div class="huy">
                                            <h:commandLink action="#{adminComplaintRequest.deleteComplaint()}" onclick="return confirm('Do you want to remove ?\n')" style="text-decoration: none" >
                                                <img border="0" src="images/huy.jpg"/>
                                                <f:param name="cID" value="#{b.c_ID}"></f:param>
                                            </h:commandLink>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </ui:repeat>
                    </div>
                </div>
            </h:form>
        </ui:composition>
    </h:body>
</html>

